<?php

class EmpresasController extends AppController {

    public $sl_empresas = array(
        "actions" => array("V" => "view", "E" => "edit", "D" => "delete"),
        "filters" => array(
            array("name" => 'Empresa.nombre', "label" => 'Nombre')
        ),
        "columns" => array(
            array("name" => 'Empresa.nombre', "label" => 'Nombre')
        )
    );
    public $maint_empresas = array(
        "fields" => array(
            "Descripción de la Empresa" => array(
                array("name" => "fecha_carga", "label" => "Fecha Carga", "presentation" => "DATETIME", 'classparams' => '{"force":true}', 'isvisible' => false, "actions" => "A"),
                array("name" => "nombre", "label" => "Nombre")
            )
        )
    );
    
    public function add() {
        $this->maint = $this->maint_empresas;
        parent::add();
    }

    public function edit($id = null) {
        $this->maint = $this->maint_empresas;
        parent::edit($id);
    }

    public function index() {
        $this->search_list = $this->sl_empresas;
        parent::index();
    }

    public function view($id = null) {
        $this->maint = $this->maint_empresas;
        parent::view($id);
    }

}